package com.googlecode.chigs.web.doku.version;

import com.googlecode.chigs.domain.Version;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.MarkupStream;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;

public class VersionLabel extends Label {
	private final Version version;
	
	public VersionLabel(String id, IModel<Version> model) {
		super(id, model);
		version = model.getObject();
	}
	
	@Override
	protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {
		final String str = version.getVersion();
		replaceComponentTagBody(markupStream, openTag, str);
	}

}
